package com.hebeu.xwl.service;

import com.hebeu.xwl.dao.LogDao;
import com.hebeu.xwl.pojo.Log;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class LogService {

    @Autowired
    private LogDao logDao;

    @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = {Exception.class})
    public List<Log> findAll(){
        return logDao.selectList(null);
    }
}
